# Title     : TODO
# Objective : TODO
# Created by: xueyj
# Created on: 2020/11/19

pacman::p_load(rmarkdown, lazyopt, magrittr, dplyr)
opt <- c("packagepath", "i", 2, "character", "Folder path", "",
         "Rmdpath", "ri", 2, "character", "Rmd File path", "",
         "outputfilepath", "o", 2, "character", "output file path", ""
) %>%
  matrix(byrow = TRUE, ncol = 6) %>%
  lazyopt()
params <- opt %$% list(packagepath) %>% setNames("path")

opt %$% render(input = Rmdpath,
               output_file = outputfilepath,
               params = params)




